class Animal(object):
    pass


class Person(Animal):
    pass


class Student(Person):
    pass


s1 = Student()
s2 = Student()
p1 = Person()
# 1."object1 is object2"
# is 判断两个对象是否是同一对象（地址是否相同）
print(s1 is s2)  # False
# 2.type(object/<class_name>)
print(type(s1))
print(type(Student))
print(type(s1) == type(Student))  # False
# 3.isinstance(object,(<class_name1>, ))
# 判断object是否是这些/个class的实例化对象
print(isinstance(s1, (Student, Person, Animal)))  # True
print(isinstance(s1, Person))  # True
print(isinstance(p1, Student))  # False
# 4.issubclass(<class_name>, (<class_name1>, ))
# 判断一个class是否是后面那些/个类的子类
print(issubclass(Student, (Student, Person, Animal)))  # True
print(issubclass(Student, Person))  # True
print(issubclass(Person, Student))  # False
